<form method="post" action="{-$body.url-}&act={-if $L.id-}eok&id={-$L.id-}{-else-}aok{-/if-}">

<div class="bodytabdiv">
<table class='bodytab' cellspacing='1' id="form1">
<tr>
	<th class='th' colspan='2'>{-if $L.id-}修改{-else-}添加{-/if-}参数节点</th>
</tr>

<tr>
	<td width='120'>父节点</td>
	<td>{-$P.paramName-}</td>
</tr>

<tr>
	<td>参数名</td>
	<td><input name='paramName' value='{-$L.paramName-}'></td>
</tr>

<tr>
	<td>参数值</td>
	<td><input name="paramValue" value='{-$L.paramValue-}'/></td>
</tr>

<tr style="display:none">
	<td>别　名</td>
	<td><input name="paramKey" value='{-$L.paramKey-}'/></td>
</tr>



<tr>
	<td >优先级</td>
	<td><input name='orderId' value='{-$L.orderId|default:'0'-}' size='2' maxlength='2'></td>
</tr>


<tr val="{-$L.isReferer-}" style="display:none">
 <td>是否引用</td>
 <td>
	<label for="d_isReferer1"><input type="radio" name="isReferer" id="d_isReferer1" value='1' />是</label>
	<label for="d_isReferer0"><input type="radio" name="isReferer" id="d_isReferer0" value='0' />否</label>
	<a class="note">引用会以参数值作为id指向另一个参数节点</a>
 </td>
</tr>


{-if !$L.id || !$L.isCanChangeParent-}

<tr val="{-$L.isParent-}">
 <td>是否父节点</td>
 <td>

	<label for="d_isParent1"><input type="radio" name="isParent" id="d_isParent1" value='1' />是</label>
	<label for="d_isParent0"><input type="radio" name="isParent" id="d_isParent0" value='0' />否</label>
 </td>
</tr>
{-/if-}


</table>
</div>


<input type='hidden' name='jurl' value='{-$_ENV.referer-}'>

<div class='bodysubmit'>
<input type='submit' value='递交'>
<input type='reset' value='默认'>
</div>

</form>

<div class='bodyfooter'>
	<a href='{-$_ENV.referer-}'>返回</a>
</div>

<script type="text/javascript">

new XForm('form1', function(){
	var elements	= this.dom.elements;

	var e	= elements["paramKey"];
	if(!e.value.match(/^([^\x00-\xff]|\w){0,15}$/) ){
		alert('参数键不能包含特殊字符!');	e.select();e.focus(); return true;
	}

	var e	= elements["paramName"];
	if(!e.value.match(/^([^\x00-\xff]|[\w\/\-\_\.\&]){1,15}$/)){
		alert('参数名不能为空,并且不能包含特殊字符!');
		e.select();	e.focus(); return true;
	}

	var e = elements['orderId'];
	if( !e.value.match(/^\d{1,2}$/) ){
		alert('优先级只能是不大于100的数字');
		e.select(); e.focus(); return true;
	}
	delete elements;
});
</script>